#include <memory>
#include <iostream>
#include <string>
using namespace std;

void del(int* p) {
	delete p;
	cout << "删除完成！" << endl;
}
int main() {
	{
		std::shared_ptr<int> sp(new int(4), del);
		cout << sp.use_count() << endl;
		cout << *sp << endl;
	}
	cout << "---------------" << endl;
	return 0;
}